package com.club.football.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import static com.club.football.common.CommonConstants.NO_CHOOSE_MSG;
import static com.club.football.common.CommonConstants.NULL_MSG;

/**
 * 反馈星形dto
 *
 * @author 1
 * @date 2024/01/24
 */
@Data
public class FeedBackStarDto {

    /**
     * 反馈ID
     */
    @NotNull
    private Long feedbackId;

    /**
     * 电话
     */
    @NotBlank(message = NULL_MSG + "手机号")
    @Length(max = 11, min = 11, message = "手机号不能少于{min}或超过{max}个字符")
    private String phone;

    /**
     * 星星
     */
    @NotNull(message = NO_CHOOSE_MSG + "评分")
    @Max(5)
    @Min(1)
    private Integer star;

}
